package reviewAlgorithms.math;

public class TrailingZeroes {
    public static void main(String[] args) {
        int n = 10;
        System.out.println(trailingZeroes(n));
    }
    public static int trailingZeroes(int n) {
        return n == 0 ? 0 : n / 5 + trailingZeroes(n / 5);
    }
}
